<?php
class Update_Gallery_Sql_r5 extends KontorX_Update_Db_Mysql_Table {

	public function __construct() {
		parent::__construct('gallery_album');
	}

	public function up() {
		$this->addColumn('time_create', array(
			'type' => 'DATE',
			'null' => 'NOT NULL',
			'after' => 'AFTER `display_type`'
		));

		$this->addIndex('time_index', array(
			'columns' => array('time_create')
		));
	}

	public function down() {
		$this->removeColumn('time_create');
		$this->removeIndex('time_index');
	}
}

return new Update_Gallery_Sql_r5();